import java.util.*;
public class Algo_2024_9_5_203 {

    public static void main(String[] ags){

        Scanner sc = new Scanner(System.in);
        //nextLine  字符串
        //equals    判断
        //order
        char[] arr1 = {'a','b','c'};
        char[] arr2 = {'c','b','a'};

       if(flashback(arr1,arr2)){
           System.out.println("YSE");
       }else {
           System.out.println("NO");
       }

    }

    public static boolean flashback(char[] arr1,char[] arr2){
        for(int i =0;i<arr1.length;i++){
            for(int j = arr2.length-1;j>0;j--){
                if(arr1[i]==arr2[j]){
                    return true;
                }
            }
        }

        return false;
    }
}
